package com.jzqf.harmonydemo.utils;

import ohos.app.Context;

/**
 * 应用上下文
 *
 * @author LiuWeiHao
 * 2021/5/12 10:01
 */
public class ContextApp {

    private static Context mContext;

    public static Context app() {
        if (mContext == null) {
            throw new NullPointerException("context is not init().");
        }
        return mContext;
    }

    public static void init(Context context) {
        mContext = context;
    }

}
